//
// Created by wze-zero on 2024/8/28 028.
//
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    int score1, score2, score3, score4;
    double score;
    cin >> score1 >> score2 >> score3 >> score4;
    score = score1 * 0.2 + score2 * 0.1 + score3 * 0.2 + score4 * 0.5;
    cout << fixed << setprecision(1) << score << endl;
    return 0;
}